<div class="applications view">
<h2><?php  echo __('Application');?></h2>
	<dl>
		<dt><?php echo __('Id'); ?></dt>
		<dd>
			<?php echo h($application['Application']['id']); ?>
			&nbsp;
		</dd>
		<dt><?php echo __('User'); ?></dt>
		<dd>
			<?php echo $this->Html->link($application['User']['username'], array('controller' => 'users', 'action' => 'view', $application['User']['id'])); ?>
			&nbsp;
		</dd>
		<dt><?php echo __('Summary'); ?></dt>
		<dd>
			<?php echo h($application['Application']['summary']); ?>
			&nbsp;
		</dd>
		<dt><?php echo __('Created'); ?></dt>
		<dd>
			<?php echo h($application['Application']['created']); ?>
			&nbsp;
		</dd>
		<dt><?php echo __('Final Status'); ?></dt>
		<dd>
			<?php echo h($application['Application']['final_status']); ?>
			&nbsp;
		</dd>
		<dt><?php echo __('Status'); ?></dt>
		<dd>
			<?php echo h($application['Application']['status']); ?>
			&nbsp;
		</dd>
		<dt><?php echo __('Template Pointer'); ?></dt>
		<dd>
			<?php echo h($application['Application']['template_pointer']); ?>
			&nbsp;
		</dd>
	</dl>
</div>
<div class="actions">
	<h3><?php echo __('Actions'); ?></h3>
	<ul>
		<li><?php echo $this->Html->link(__('Edit Application'), array('action' => 'edit', $application['Application']['id'])); ?> </li>
		<li><?php echo $this->Form->postLink(__('Delete Application'), array('action' => 'delete', $application['Application']['id']), null, __('Are you sure you want to delete # %s?', $application['Application']['id'])); ?> </li>
		<li><?php echo $this->Html->link(__('List Applications'), array('action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('New Application'), array('action' => 'add')); ?> </li>
		<li><?php echo $this->Html->link(__('List Users'), array('controller' => 'users', 'action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('New User'), array('controller' => 'users', 'action' => 'add')); ?> </li>
		<li><?php echo $this->Html->link(__('List Attachments'), array('controller' => 'attachments', 'action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('New Attachment'), array('controller' => 'attachments', 'action' => 'add')); ?> </li>
		<li><?php echo $this->Html->link(__('List Flownodes'), array('controller' => 'flownodes', 'action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('New Flownode'), array('controller' => 'flownodes', 'action' => 'add')); ?> </li>
	</ul>
</div>
<div class="related">
	<h3><?php echo __('Related Attachments');?></h3>
	<?php if (!empty($application['Attachment'])):?>
	<table cellpadding = "0" cellspacing = "0">
	<tr>
		<th><?php echo __('Id'); ?></th>
		<th><?php echo __('Application Id'); ?></th>
		<th><?php echo __('Filecontent'); ?></th>
		<th class="actions"><?php echo __('Actions');?></th>
	</tr>
	<?php
		$i = 0;
		foreach ($application['Attachment'] as $attachment): ?>
		<tr>
			<td><?php echo $attachment['id'];?></td>
			<td><?php echo $attachment['application_id'];?></td>
			<td><?php echo $attachment['filecontent'];?></td>
			<td class="actions">
				<?php echo $this->Html->link(__('View'), array('controller' => 'attachments', 'action' => 'view', $attachment['id'])); ?>
				<?php echo $this->Html->link(__('Edit'), array('controller' => 'attachments', 'action' => 'edit', $attachment['id'])); ?>
				<?php echo $this->Form->postLink(__('Delete'), array('controller' => 'attachments', 'action' => 'delete', $attachment['id']), null, __('Are you sure you want to delete # %s?', $attachment['id'])); ?>
			</td>
		</tr>
	<?php endforeach; ?>
	</table>
<?php endif; ?>

	<div class="actions">
		<ul>
			<li><?php echo $this->Html->link(__('New Attachment'), array('controller' => 'attachments', 'action' => 'add'));?> </li>
		</ul>
	</div>
</div>
<div class="related">
	<h3><?php echo __('Related Flownodes');?></h3>
	<?php if (!empty($application['Flownode'])):?>
	<table cellpadding = "0" cellspacing = "0">
	<tr>
		<th><?php echo __('Id'); ?></th>
		<th><?php echo __('Application Id'); ?></th>
		<th><?php echo __('User Id'); ?></th>
		<th><?php echo __('Loc Index'); ?></th>
		<th><?php echo __('Loc Identity'); ?></th>
		<th><?php echo __('Status'); ?></th>
		<th><?php echo __('Approved Time'); ?></th>
		<th class="actions"><?php echo __('Actions');?></th>
	</tr>
	<?php
		$i = 0;
		foreach ($application['Flownode'] as $flownode): ?>
		<tr>
			<td><?php echo $flownode['id'];?></td>
			<td><?php echo $flownode['application_id'];?></td>
			<td><?php echo $flownode['user_id'];?></td>
			<td><?php echo $flownode['loc_index'];?></td>
			<td><?php echo $flownode['loc_identity'];?></td>
			<td><?php echo $flownode['status'];?></td>
			<td><?php echo $flownode['approved_time'];?></td>
			<td class="actions">
				<?php echo $this->Html->link(__('View'), array('controller' => 'flownodes', 'action' => 'view', $flownode['id'])); ?>
				<?php echo $this->Html->link(__('Edit'), array('controller' => 'flownodes', 'action' => 'edit', $flownode['id'])); ?>
				<?php echo $this->Form->postLink(__('Delete'), array('controller' => 'flownodes', 'action' => 'delete', $flownode['id']), null, __('Are you sure you want to delete # %s?', $flownode['id'])); ?>
			</td>
		</tr>
	<?php endforeach; ?>
	</table>
<?php endif; ?>

	<div class="actions">
		<ul>
			<li><?php echo $this->Html->link(__('New Flownode'), array('controller' => 'flownodes', 'action' => 'add'));?> </li>
		</ul>
	</div>
</div>
